#!/usr/bin/env perl

# Author: Dylan J. Sather
# Date Created: 2009-06-30
# Last edited: 2009-06-30

use Net::Telnet;
use Sys::Hostname;

# Get hostname
$hostname = hostname();
$server_url = 'tcdb.grinnell.edu';

# Initiate telnet connection on port 80, send "$hostname" as HTTP request
$telnet = new Net::Telnet (Port=> 80);
$telnet->open($server_url);
$http_request = "GET /map/cgi/available_comps.php?id=$hostname&comp_on=TRUE&type=pc";
$telnet->print($http_request);
